//
//  MGLDefine.h
//  medicineplus
//
//  Created by gufei on 15-4-3.
//  Copyright (c) 2015年 chn_ruby@126.cn. All rights reserved.
//

#ifndef medicineplus_MGLDefine_h
#define medicineplus_MGLDefine_h

#define NavigationBar_HEIGHT 44
#define TABBAR_HEIGHT 49
#define StatusBar_HEIGHT ([[UIApplication sharedApplication] statusBarFrame].size.height)
#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)
#define FRAME_WIDTH (self.view.frame.size.width)
#define SAFE_RELEASE(x) [x release];x=nil
#define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue]
#define CurrentSystemVersion ([[UIDevice currentDevice] systemVersion])
#define CurrentLanguage ([[NSLocale preferredLanguages] objectAtIndex:0])

#define BACKGROUND_COLOR [UIColor colorWithRed:242.0/255.0 green:236.0/255.0 blue:231.0/255.0 alpha:1.0]

//use dlog to print while in debug model
#ifdef DEBUG
#   define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#   define DLog(...)
#endif

#define isRetina ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
#define isPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)

#pragma
#pragma mark-sys.config
#define kNetBaseURL @"http://218.1.73.212:8886/"
#define kNetCdnURL @""

#pragma 
#pragma mark-cmd.url
#define kCMDInitURL @"init/"
#define kCMDLoginURL @"user/login?"
#define kCMDRegisterURL @"user/register?"

#pragma
#pragma mark-label.fonts
#define kFontSize26 @"26.0f"
#define kFontSize24 @"24.0f"
#define kFontSize22 @"22.0f"
#define kFontSize20 @"20.0f"
#define kFontSize18 @"18.0f"
#define kFontSize16 @"16.0f"
#define kFontSize14 @"14.0f"
#define kFontSize12 @"12.0f"


#define PADDING_5 5
#define PADDING_7 7.3
#define PADDING_10 10
#define PADDING_15 15
#define PADDING_20 20

#define LABEL_HEIGHT_20 20
#define LABEL_HEIGHT_22 22

// All app colors defined here
#define kBlueColor @"#4a90e2"
#define kGrayColor @"#4a4a4a"
#define kPurpleColor @"#ed1e79"

#pragma 
#pragma mark-JSON.key.constant
#define kJToken @"token"
#define kJPlatform @"platform"
#define kJTimes @"times"
#define kJSign @"sign"
#define kJMobile @"mobile"
#define kJPassWord @"passwd"

#endif
